package database;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author link3988
 */
import java.util.ArrayList;
public class MainTopic {

    private String topic = "";
    ArrayList<SubTopic> subtopics;
    public MainTopic(String tp)
    {
        topic = tp;
        subtopics = new ArrayList();
    }

    public String getTopic()
    {
        return topic;
    }

    public void addSubTopic(SubTopic sbtp)
    {
        subtopics.add(sbtp);
    }

    public int subSize()
    {
        return subtopics.size();
    }

    public SubTopic getSubTopic(int index)
    {
        return subtopics.get(index);
    }

}
